import {
	request
} from '@/assets/api/index.js'

const likeApi = (wishTreeUserId) => request(
	"GET",
	`/memories/wishTreeUser/like?wishTreeUserId=${wishTreeUserId}`
)
const likeStatisticsApi = (wishTreeUserId) => request(
	"GET",
	`/memories/wishTreeUser/likeStatistics?wishTreeUserId=${wishTreeUserId}`
)
const statisticsApi = () => request(
	"GET",
	`/memories/wishTreeUser/statistics`
)
const getWishTreeListApi = () => request(
	"GET",
	`/memories/wishTree/list?pageNum=${1}&pageSize=${12}`
)
const deleteWishTreeUserApi = (ids) => request("DELETE", `/memories/wishTreeUser/${ids}`)
const putWishTreeUserApi = (data) => request("PUT", `/memories/wishTreeUser`, data)
const postWishTreeUserApi = (data) => request("POST", `/memories/wishTreeUser`, data)
const getWishTreeUserApi = (id) => request("GET", `/memories/wishTreeUser/${id}`)
const getWishTreeUserListApi = (userId, wishTreeIds, isAnonymous = '否', pageNum = 1, pageSize = 10) => request(
	"GET",
	`/memories/wishTreeUser/list?userId=${userId}&pageNum=${pageNum}&pageSize=${pageSize}&wishTreeIds=${wishTreeIds}&isAnonymous=${isAnonymous}`
)

export {
	likeApi,
	likeStatisticsApi,
	statisticsApi,
	getWishTreeListApi,
	putWishTreeUserApi,
	postWishTreeUserApi,
	getWishTreeUserApi,
	getWishTreeUserListApi,
	deleteWishTreeUserApi,
}